/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package epam_java.telephone.users;

/**
 *
 * @author 1
 */
abstract public class AbstractUser {

    public AbstractUser(int userId, String userName, String login, String pass, Acces currentAcces) {
        this.userId = userId;
        this.userName = userName;
        this.login = login;
        this.pass = pass;
        this.currentAcces = currentAcces;
    }

    /**
     * @return the balance
     */
    public int getBalance() {
        return balance;
    }

    /**
     * @param balance the balance to set
     */
    public void setBalance(int balance) {
        this.balance = balance;
    }

    /**
     * @return the Locked
     */
    public boolean isLocked() {
        return locked;
    }

    /**
     * @param Locked the Locked to set
     */
    public void setLocked(boolean locked) {
        this.locked = locked;
    }

    /**
     * @return the automaticalyPay
     */
    public boolean isAutomaticalyPay() {
        return automaticalyPay;
    }

    /**
     * @param automaticalyPay the automaticalyPay to set
     */
    public void setAutomaticalyPay(boolean automaticalyPay) {
        this.automaticalyPay = automaticalyPay;
    }

    /**
     * @return the mail
     */
    public String getMail() {
        return mail;
    }

    /**
     * @param mail the mail to set
     */
    public void setMail(String mail) {
        this.mail = mail;
    }

    /**
     * @return the userId
     */
    public int getUserId() {
        return userId;
    }

    /**
     * @param userId the userId to set
     */
    public void setUserId(int userId) {
        this.userId = userId;
    }

    /**
     *  acceses
     */

    /**
     * id identificated user
     */
     private String mail;
     private boolean automaticalyPay;
    private int balance;
    private boolean locked;
    private int userId;
    /**
     * users login;
     */
    /**
     * user name
     */
    private String userName;
    /**
     * user login
     */
    private String login;
    /**
     * password of user
     */
    private String pass;
    /**
     * acces rights of current user;
     */
    private Acces currentAcces;

    /**
     * @return the login
     */
    public String getLogin() {
        return login;
    }

    /**
     * @param login the login to set
     */
    public void setLogin(String login) {
        this.login = login;
    }

    /**
     * @return the pass
     */
    public String getPass() {
        return pass;
    }

    /**
     * @param pass the pass to set
     */
    public void setPass(String pass) {
        this.pass = pass;
    }

    /**
     * @return the currentAcces
     */
    public Acces getCurrentAcces() {
        return currentAcces;
    }

    /**
     * @param currentAcces the currentAcces to set
     */
    public void setCurrentAcces(Acces currentAcces) {
        this.currentAcces = currentAcces;
    }
    /** 
     * refresh login and password in database
     */
    public void refreshInBd(){

    }
    /**
     * @return the userName
     */
    public String getUserName() {
        return userName;
    }

    /**
     * @param userName the userName to set
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }

}
